﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace Fares
{
    public partial class ArticolePreturiFrm : FrmRezumat
    {
        private Int32 IDArticol = -1;
        private Int64 IDPartener = -1;
        private Int16 CodValuta = -1;

        public ArticolePreturiFrm(ModuleClass mc,Int32 _idArt,Int64 _idPart,Int16 codV):base(mc)
        {
            InitializeComponent();
            IDArticol = _idArt;
            IDPartener = _idPart;
            CodValuta = codV;
        }

        private void ArticolePreturiFrm_Load(object sender, EventArgs e)
        {
            SqlConnection con = DeschideConexiune(workConnString);
            this.valutaTableAdapter.Connection = con;
            this.valutaTableAdapter.Fill(this.eSRPDataSetArticol.Valuta);
            this.articolePreturiTableAdapter.Connection = con;
            this.articolePreturiTableAdapter.FillByArticolPartenerValuta(this.eSRPDataSetArticol.ArticolePreturi,IDArticol,IDPartener,CodValuta);
            InchideConexiune(con);

            AddBindingSource(articolePreturiBindingSource);
            AddTableAdaptor(articolePreturiTableAdapter.Adapter);
        }
    }
}
